package br.com.localfloripa.entities;

public enum TipoCombustivel {
	
	G("GASOLINA"),
	E("ETANOL"),
	D("DIESEL"),
	F("FLEX");

	private final String value;
	
	private TipoCombustivel(String value) {
		this.value = value;		
	}
	
	public String value() {  
	    return this.value;  
	}  
	
	public static TipoCombustivel fromName(String text) {
	    if (text != null) {
	      for (TipoCombustivel tipo : TipoCombustivel.values()) {
	        if (text.equalsIgnoreCase(tipo.name())) {
	          return tipo;
	        }
	      }
	    }
	    return null;
    }

}
